package com.xiaoxin.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.security.SecurityRequirements;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: ZhangXX
 * @createTime: 2024-08-24 08:19
 **/
@Api(tags = "你好")
@RestController
@RequestMapping("/hello")
public class HelloController {
    //@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
    @SecurityRequirements({@SecurityRequirement(name = "apiKey"), @SecurityRequirement(name = "apiKey1")})

    @ApiOperation(value = "向客人问好")
    @ApiOperationSupport(ignoreParameters = {"id", "productCount", "productCommentCount"})
    @GetMapping("/sayHi")
    public ResponseEntity<String> sayHi(@RequestParam("name") String name) {
        return ResponseEntity.ok("Hi:" + name);
    }


}
